<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>预约中</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/dropload.css" rel="stylesheet" type="text/css" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/appointing.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="container">
        <div id="list-dom">
        </div>
    </div>
    <script id="list" type="text/html">
        {{each list}}
        <div class="card">
            <a href="house.html?id={{ $value.id }}">
                <div class="card-head">
                    <img class="card-media" src="{{ $value.pic }}" />
                    <div class="card-head-title">￥{{ $value.money }}/月</div>
                </div>
                <div class="card-body">
                    <span class="card-body-title">{{ $value.neighbourhood_name }}</span> {{each $value.configuration}}
                    <label class="{{ $index | color }}">{{ $value }}</label> {{/each}}
                    <ul class="card-body-content">
                        <li>{{ $value.region_name }}</li>
                        <li>{{ $value.population }}</li>
                        <li>{{ $value.size }}㎡</li>
                        <li class="last">{{ $value.nums }}间在租</li>
                    </ul>
                    <div class="divider"></div>
                </div>
            </a>
        </div>
        {{/each}}
    </script>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/dropload.min.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            // 页数
            var page = 0;
            // 每页展示5个
            var limit = 5;

            // 房源列表下拉加载更多
            $('.container').dropload({
                scrollArea: window,
                loadDownFn: function(me) {
                    page++;

                    bee.request({
                        url: '/Member/Index/appointment_list',
                        data: {
                            page: page,
                            limit: limit,
                        },
                        success: function(result) {
                            if (result.list.length) {
                                bee.template('list', result);
                            } else {
                                me.lock();
                                me.noData();
                            }
                            me.resetload();
                        }
                    });
                }
            });
        });
    </script>
</body>

</html>
